import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useFlyNumStore = defineStore('flyNumStore', () => {
  const flyNum = ref({
    daNum: '1',
    dongNum: '0',
    enNum: '1'
  })

  const flyType = ref({
    evtol: '2',
    zhi: '0',
    hua: '0'
  })

  const radioShow = ref(false)

  const setFlyNum = (item) => {
    flyNum.value = {
      daNum: item.daNum,
      dongNum: item.dongNum,
      enNum: item.enNum
    }
  }

  const setFlyType = (item) => {
    flyType.value = {
      evtol: item.evtol,
      zhi: item.zhi,
      hua: item.hua
    }
  }

  const setRadioShow = (item) => {
    radioShow.value = item
  }

  const showUi = ref(false)

  const setShowUi = (item) => {
    showUi.value = item
  }

  return { flyNum, setFlyNum, flyType, setFlyType, radioShow, setRadioShow, showUi, setShowUi }
})
